package code02_运算符;

import java.util.Scanner;

/*
 * 提示用户分别输入Java、MySQL、Linux三门课程的成绩，计算总分和平均分
 */
public class 练习1 {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		System.out.print("请输入Java成绩：");
		int java = input.nextInt();
		System.out.print("请输入MySQL成绩：");
		int mysql = input.nextInt();
		System.out.print("请输入Linux成绩：");
		int linux = input.nextInt();

		double sum = java + mysql + linux;
		double avg = sum / 3;

		System.out.println("--------------------------------");
		System.out.println("Java\t\tMySQL\t\tLinux");
		System.out.println(java + "\t\t" + mysql + "\t\t" + linux);
		System.out.println("--------------------------------");
		System.out.println("总分：" + sum);
		System.out.println("平均分：" + avg);

	}
}
